package com.yunyike.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yunyike.mapper.ShopCategoryMapper;
import com.yunyike.model.ShopCategory;
import com.yunyike.service.IShopCategoryService;

@Service("shopCategoryServiceImpl")
public class ShopCategoryServiceImpl implements IShopCategoryService{

	private Logger log = LoggerFactory.getLogger(ShopCategoryServiceImpl.class);

	@Autowired
	private ShopCategoryMapper ShopCategoryMapper;
	
	public int addShopCategory(ShopCategory shopCategory) {
			
		log.info("----->> add ShopCategory....");
		
		int result = 0;
		try {
			result = ShopCategoryMapper.insert(shopCategory);
		} catch (Exception e) {
			log.info("add ShopCategory has errors,message:"+e.getMessage(),e);
		}
		
		log.info("add ShopCategory end .result:"+result+"<<----");
		
		return result;
	}

}
